<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
</head>
<style>
   
</style>
<body>
    <div id="app">
        


     <!-- style 对象的写法 -->
       <div :style="{color:'red',fontSize:'50px'}">test active1</div>
      
       <div :style="boxStyle">text active2</div>
       
    </div>
   <script>
     const vm = new Vue({
        el:"#app",
        data(){
            return{
                boxStyle:{
                    color:"pink",
                    fontSize:"50px",
                    fontWeight:"bold",
                }
                   
                }
             }
    })
   </script>
</body>
</html>